package com.halflife.comeElectricity.orderMng.order;

/**
 * Created by zhaoyf on 2018/3/10.
 */
public class Rush {
    public Integer count= 0;
    public synchronized Integer rush(){
        this.count++;
        return count;
    }

    public static void main(String[] args) {
        Rush rush = new Rush();
        for(int i=0;i<10000;i++) {
            Thread a = new Thread(() -> {
                System.out.println(rush.rush());
            });
            a.start();
        }
    }
}
